import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [{
	// 首页
	path: '/',
	name: 'home',
	component: Home,
	children: [
		{
			path: '/',
			redirect: 'recommend',
			},
		{
			path: '/recommend',
			name: 'recommend',
			component: () => import('../views/recommend.vue'),
		},
		{
			path: '/rank',
			name: 'rank',
			component: () => import('../views/rank.vue'),
		},
		{
			path: '/search',
			name: 'search',
			component: () => import('../views/search.vue'),
		},
		
	]
	},
	{
		// 专辑列表详情页
		path: '/List',
		name: 'List',
		component: () => import('../views/List.vue'),
	},
	{
		// 音乐播放控制台
		path: '/controlPanel',
		name: 'controlPanel',
		component: () => import('../views/controlPanel.vue'),
	},
	{
		// 搜索结果页
		path: '/result',
		name:'result',
		component: () => import('../views/result.vue'),
	},	
	{
		// 音乐播放控制台进度条
		path: '/Progress',
		name:'Progress',
		component: () => import('../components/Progress.vue'),
	},	
	{
		path: '/moreSongList',
		name: 'moreSongList',
		component: () => import('../views/moreSongList.vue'),
	},
]

const router = new VueRouter({
	routes
})

export default router
